package com.example.observer;

import java.util.ArrayList;
import java.util.List;

/**
 * @version 1.0.0
 * @className: XiaoMei
 * @description:
 * @author: rosszhang
 * @date: 2022/5/13 9:37
 */
public class XiaoMei {
    List<Person> list=new ArrayList<>();

    public XiaoMei() {
    }
    public void addPerson(Person person){
        list.add(person);
    }

    public void notifyPerson(){
        for (Person person:list){
            person.getMessage("过来陪我打游戏哦，谁先到，就陪谁玩游戏！！！！");
        }
    }
}
